package model
{
	public class ActionVO
	{
		static var MAX_LEN_DESC:int = 255;
		
		private var _description:String;
		public var category:CategoryVO;
		public var completed:Boolean;
		public var due_date:Date;
		
		public function ActionVO( description:String = null,
								  category:CategoryVO = null,
								  completed:Boolean = null,
								  due_date:Date = null )
		{
			this.description = description;
			this.category = category;
			this.completed = completed;
			this.due_date = due_date;			
		}

		// Seperate setter and getter to enforce max length.
		public function set description( value:String ):void
		{
			_name = value.slice(0, MAX_LEN_DESC);
		}
		
		public function get description():String
		{
			return _name;
		}
	}
}